home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / newsgroups / misc.19981211-19990422 / 000309_news@watsun.cc.columbia.edu _Tue Mar 2 18:33:05 1999.msg < prev    next >
Internet Message Format  |  2020-01-01  |  3KB

  1. Return-Path: <news@watsun.cc.columbia.edu>
  2. Received: from newsmaster.cc.columbia.edu (newsmaster.cc.columbia.edu [128.59.59.30])
  3.     by watsun.cc.columbia.edu (8.8.5/8.8.5) with ESMTP id SAA16230
  4.     for <kermit.misc@watsun.cc.columbia.edu>; Tue, 2 Mar 1999 18:33:04 -0500 (EST)
  5. Received: (from news@localhost)
  6.     by newsmaster.cc.columbia.edu (8.8.5/8.8.5) id SAA20167
  7.     for kermit.misc@watsun.cc.columbia.edu; Tue, 2 Mar 1999 18:10:26 -0500 (EST)
  8. X-Authentication-Warning: newsmaster.cc.columbia.edu: news set sender to <news> using -f
  9. From: fdc@watsun.cc.columbia.edu (Frank da Cruz)
  10. Subject: Re: question on kermit script
  11. Date: 2 Mar 1999 23:10:16 GMT
  12. Organization: Columbia University
  13. Message-ID: <7bhr4o$jm3$1@newsmaster.cc.columbia.edu>
  14. To: kermit.misc@mailrelay2.cc.columbia.edu
  15.  
  16. In article <7bhpsf$l17$1@nnrp1.dejanews.com>,  <apatnaik@aircom.com> wrote:
  17. : I am attempting to write a kermit script that will initialize a modem,
  18. : receive a call, wait for RING tone, and then output all the DTMF digits
  19. : received. Note that modem is only expected to receive DTMF digits from an
  20. : inbound call and not from another modem. It expects a digit of 9, in this
  21. : case.
  22. : I have been using the C-Kermit 6.0 book to build the commands.
  23. : I have this script so far.. But all my INPUT commands fail...
  24. : I tried this using interactive kermit and my commands worked. There is
  25. : something about INPUT, MINPUT that is wrong. Appreciate any HELP!!! THANKS!!
  26. : define TONERECEIVER {
  27. :         set modem type multitech
  28. :         set line /dev/ttya
  29. :
  30. What if this fails?  You need an IF FAIL clause here.  Otherwise your script
  31. will plow ahead even though it doesn't have the device open.
  32.  
  33. :         set speed 2400
  34. :         set carrier-watch off
  35. :         ;set input echo on
  36. :         output connect\13
  37. :
  38. What is this?  Why are you sending "connect" and carriage return to the
  39. modem?
  40.  
  41. :         output at&fm0\13
  42. :         clear input
  43. :         minput 20 OK {CONNECT}
  44. :         switch \v(minput) {
  45. :           :0, echo {No response }, break
  46. :           :1, echo {Succeeded in getting OK}, break
  47. :           :2, echo {Found CONNECT}, break
  48. :           :default, echo {Unexpected response: \v(input) }
  49. :         }
  50. :
  51. This looks OK, but why are you looking for "CONNECT"?  Is it supposed to
  52. be the echo of the "connect" string that you sent?  Or is it because the 
  53. modem might already be in answer mode even though you haven't sent it
  54. the ATS0=1 command yet?
  55.  
  56. Well, I don't see anything obviously wrong with the script, except as noted.
  57. The most common cause of "it works when I do it by hand but it doesn't
  58. work when I run the script" is the inclusion of a CONNECT command in the
  59. script, but yours doesn't have one.
  60.  
  61. But I also don't see how you are invoking the invoking the script -- maybe
  62. the procedure that is calling the TONERECEIVER macro is entering CONNECT
  63. mode?
  64.  
  65. - Frank